/*
 * _exit.java
 *
 * Created on 1 Март 2008 г., 19:53
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package xmppbot.funcs;

import java.sql.SQLException;
import xmppbot.Main;
import xmppbot.parse.options;

/**
 *
 * @author lian
 */
public class _exit implements func {
    
    /** Creates a new instance of _exit */
    public _exit() {
    }

    
    public String process(options opts) {
        try {
            Main.restart(true);
        } catch (InstantiationException ex) {
            ex.printStackTrace();
        } catch (ClassNotFoundException ex) {
            ex.printStackTrace();
        } catch (IllegalAccessException ex) {
            ex.printStackTrace();
        } catch (InterruptedException ex) {
            ex.printStackTrace();
        } catch (SQLException ex) {
            ex.printStackTrace();
        } catch (org.jivesoftware.smack.XMPPException ex) {
            ex.printStackTrace();
        }
        System.exit(0);
        return null;
    }

    
    public String processnotallowed(options opts) {
        return null;
    }
    
}
